package com.zl.dto;

import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.util.Date;

@Data
public class TsUserDto {

    private Long id;

    /**
     * 用户名
     */
    @NotBlank
    private String username;

    /**
     * 头像地址
     */
    private String avatar;

    @NotBlank
    @Pattern(regexp = "([a-z0-9A-Z]+[-|\\.]?)+[a-z0-9A-Z]@([a-z0-9A-Z]+(-[a-z0-9A-Z]+)?\\.)+[a-zA-Z]{2,}",message = "格式错误")
    private String email;

    /**
     * 电话
     */
    @NotBlank
    private String phone;

    @NotNull
    private Boolean enabled;

    private String password;

    private Date createTime;

    private Date lastPasswordResetTime;

    private String oldPass;

    private String newPass;
}